﻿@model Project_2._2.ViewModels.PersonViewModels
@{
    ViewBag.Title = "Đăng Ký Tài Khoản";
    Layout = "~/Views/Shared/_UserLayoutPage2.cshtml";
}
@{
    List<SelectListItem> list = new List<SelectListItem>();
    list.Add(new SelectListItem { Text = "Nam", Value = "Nam", Selected = true });
    list.Add(new SelectListItem { Text = "Nữ", Value = "Nu" });
}

<link href="~/Content/DateTimePicker_Css/jquery.datetimepicker.css" rel="stylesheet" />
<div class="ContentLeft-child">
    <div class="ContentRight-child-head">Đăng Ký</div>
    <div class="ContentRight-child-logo"></div>
    <div class="ContentRight-child-body Box_sp" >
       

        @using (Html.BeginForm())
        {       
            @Html.ValidationSummary(true) 
            @Html.AntiForgeryToken()
               
            <table  style="padding:10px 0 15px 100px ; line-height:35px">
                @*<tr>
                    <td></td>
                    <td >
                        @if (!string.IsNullOrEmpty(ViewBag.SucessMessage))
                        {
                            <div style="color:red; font-weight:bold; font-size:14px">@ViewBag.SucessMessage</div>
                        } 
                    </td>
                </tr>*@
                <tr>
                    <td class="align-right">@Html.LabelFor(m => m.TenDangNhap)&nbsp;<span style="color:red">*</span></td>
                    <td> 
                        @Html.TextBoxFor(m => m.TenDangNhap, new { @class="Textbox" })
                        @Html.ValidationMessageFor(m=>m.TenDangNhap)
                    </td>
                </tr>
                <tr>
                    <td class="align-right">@Html.LabelFor(m => m.MatKhau)&nbsp;<span style="color:red">*</span></td>
                    <td>  
                        @Html.PasswordFor(m => m.MatKhau, new { @class="Textbox" })
                        @Html.ValidationMessageFor(m=>m.MatKhau)
                    </td>
                </tr>
                <tr>
                    <td class="align-right">@Html.LabelFor(m => m.ConMatKhau)&nbsp;<span style="color:red">*</span></td>
                    <td>  
                        @Html.PasswordFor(m => m.ConMatKhau, new { @class="Textbox" })
                        @Html.ValidationMessageFor( m=>m.ConMatKhau)
                    </td>
                </tr>
                <tr>
                    <td class="align-right">@Html.LabelFor(m =>m.HoTen)&nbsp;<span style="color:red">*</span></td>
                    <td>  
                        @Html.TextBoxFor(m => m.HoTen, new { @class="Textbox"})
                        @Html.ValidationMessageFor(m => m.HoTen)
                    </td>
                </tr>
                <tr>
                    <td class="align-right">@Html.LabelFor(m => m.NgaySinh)&nbsp;<span style="color:red">*</span></td>
                    <td>
                        @Html.TextBoxFor(m => m.NgaySinh, new { @class="Textbox"})
                        @Html.ValidationMessageFor(m => m.NgaySinh )
                    </td>
                    <script src="~/Script/DateTimePicker_Js/jquery.js"></script>
                    <script src="~/Script/DateTimePicker_Js/jquery.datetimepicker.js"></script>
                    <script>

                        jQuery('#NgaySinh').datetimepicker({
                            lang: 'vi',
                            i18n: {
                                de: {
                                    months: [
                                     'Tháng 1', 'Tháng 2', 'Tháng 3', 'Tháng 4',
                                     'Tháng 5', 'Tháng 6', 'Tháng 7', 'Tháng 8',
                                     'Tháng 9', 'Tháng 10', 'Tháng 11', 'Tháng 12',
                                    ],
                                    dayOfWeek: [
                                     "CN", "T2", "T3", "T4",
                                     "T5", "T6", "T7",
                                    ]
                                }
                            },
                            timepicker: false,
                            format: 'd - m - Y'
                        });

                    </script>
                </tr>
                <tr>
                    <td class="align-right">@Html.LabelFor(m=>m.GioiTinh)</td>
                    <td>  
                          @Html.DropDownListFor(m => m.GioiTinh, list, new { @class="select"})  
                    </td>
                </tr>
                <tr>
                    <td class="align-right">@Html.LabelFor(m =>m.Email)&nbsp;<span style="color:red">*</span></td>
                    <td>  
                        @Html.TextBoxFor(m => m.Email, new { @class="Textbox"})
                        @Html.ValidationMessageFor(m => m.Email)
                    </td>
                </tr>
                <tr>
                    <td class="align-right">@Html.LabelFor(m =>m.DienThoai)&nbsp;<span style="color:red">*</span></td>
                    <td>  
                        @Html.TextBoxFor(m => m.DienThoai, new { @class="Textbox"})
                        @Html.ValidationMessageFor(m => m.DienThoai)
                    </td>
                </tr>
                <tr>
                    <td class="align-right">@Html.LabelFor(m =>m.DiaChi)&nbsp;<span style="color:red">*</span></td>
                    <td>  
                        @Html.TextAreaFor(m => m.DiaChi, new { @class="TextArea"})
                        @Html.ValidationMessageFor(m => m.DiaChi)
                    </td>
                </tr>
                <tr>
                    <td class="align-right">@Html.LabelFor(m =>m.captcha) &nbsp;<span style="color:red">*</span></td>
                    <td>
                        @Html.TextBoxFor(m => m.captcha, new { @class="Textbox", @style="width:80px" })
                        <img ID="Img3" alt="Captcha image" src="../Captcha/Captcha"  style=" margin-bottom:-10px; height:29px;border-radius:4px; " />
                        @Html.ValidationMessageFor(m => m.captcha)
                    </td>
                </tr>
                
                <tr>
                    <td></td>
                    <td>
                        <input type="submit" class="Button" value="Đăng Ký" />
                    </td>
                </tr>

            </table>
        }
    </div>
</div>
